package com.fenghongzhang.day012;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

public class MyReceiver3 extends BroadcastReceiver {

    private static final String TAG = "MyReceiver3";
    @Override
    public void onReceive(Context context, Intent intent) {

        String action = intent.getAction();
        if(action.equals(Intent.ACTION_USER_PRESENT)){
//            Log.i(TAG, "onReceive: 屏幕亮了");
//        }else if(action.equals(Intent.ACTION_AIRPLANE_MODE_CHANGED)){
//            Log.i(TAG, "onReceive: 飞行模式关闭或者打开");
        }
    }
}
